<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index</title>
</head>
<body>
    <div id="root"></div>
    <script>
        //在前端JS中处理前端路由
        //在前端的JS中获取当前的路径
        let pathname = window.location.pathname;
        //根据路径渲染不同的内容到容器中
        root.innerHTML = pathname;
    </script>
</body>
</html>